<template>
  <div>
      <header>
           <H3>{{info.title}}</H3>
          <div class="title" @click="goback">{{info.btn}}</div>
      </header>
  </div>
</template>

<script>
export default {
    data(){
        return{
            content:""
        }
    },
    props:['info'],
    methods:{
        goback(){
            let routeobj = this.$route.path;
           if(routeobj == '/register') return this.$router.push("/login")
           this.$router.push("/register")  
        }
    }
};
</script>

<style lang="less" scoped>
header{
    position: relative;
    display: flex;
    justify-content: center;
    height: 50px;
    background-color: #fff;
    line-height: 50px;
    .title{
        position: absolute;
        right: 20px;
        top: 0;
        height: 100%;
        font-size: 13px;
        color: red;
    }

}
</style>
